
package org.onion.pattern.domain.annotation;

import java.lang.annotation.*;

/**
 * Declares a field (or a getter) of a class to constitute the identity of the corresponding class. Primarily used in
 * {@link AggregateRoot} and {@link Entity} types.
 *
 * @since 1.3
 * @see <a href="https://domainlanguage.com/wp-content/uploads/2016/05/DDD_Reference_2015-03.pdf">Domain-Driven Design
 *      Reference (Evans) - Entities</a>
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
@Documented
public @interface Identity {}
